<template>
  <div class="singer-card">
    <div class="wrap">
      <div class="singer-img">
        <img :src="src" />
      </div>
      <div class="singer-text">
        <div class="singer-text-name">{{ name }}</div>
        <div class="singer-text-intrudce">{{ intrudce }}</div>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from 'vue'

const props = {
  src: {
    type: String
  },
  name: {
    type: String
  },
  intrudce: {
    type: String
  }
} as const

export default defineComponent({
  props: props,
  setup(props) {
    const src = computed(() => props.src)
    const name = computed(() => props.name)
    const intrudce = computed(() => props.intrudce)

    return {
      src,
      name,
      intrudce
    }
  }
})
</script>

<style scoped lang="less">
.singer-card {
  width: 100%;
  height: 62px;
  background: #fafafa;
  margin-bottom: 10px;
  &:hover {
    background: #fff;
    cursor: pointer;
  }
  .wrap {
    width: 100%;
    height: 100%;
    display: flex;
    .singer-img {
      width: 62px;
      height: 62px;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .singer-text {
      flex: 1;
      height: 100%;
      padding: 0px 10px;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-items: center;
      border-right: 1px solid rgb(223, 223, 223);
      border-top: 1px solid rgb(223, 223, 223);
      border-bottom: 1px solid rgb(223, 223, 223);
      .singer-text-name {
        width: 100%;
        font-size: 10px;
        font-weight: 600;
      }
      .singer-text-intrudce {
        width: 100%;
        font-size: 10px;
        font-weight: lighter;
      }
    }
  }
}
</style>
